<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title></title>
</head>
<body>
<script src="__STATIC__/index/js/jquery-1.8.3.js"></script>
<!--[if lt IE 9]>
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
<![endif]-->
<!-- 自动适配移动端与pc端 -->
<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/0.1.4/scripts/wsdk.js,h5.openim.kit/0.0.5/scripts/kit.js" charset="utf-8"></script>

<script>

        WKIT.init({
            uid: '{$uid}',
            appkey: '{$appkey}',
            credential: '{$pwd}',
            touid: '{$touid}',
//            theme: 'orange',
//            themeBgColor: '#f00',
            onMsgReceived: function(data){
                console.log(data);
            },
            onMsgSent: function(data){
                // $.ajax({
                //     type : "POST",
                //     url: "{:url('chat/setChatCache')}",
                //     data: {data:'{$token}'},
                //     dataType: "json",
                //     success: function(res){
                //         console.log(res);
                //     }
                // });
            },
            autoMsg: '',
            titleBar: true,
            title: '',
            customUrl: '{$url}',
            onBack: function(){
              console.log('back');
            },
            onUploaderError: function(error){
                console.log(error);
            }
        });

</script>
</body>
</html>